package org.hk.dao;

import org.hk.entity.Admin;
import org.hk.jdbc.ReflectJDBC;
import org.hk.utils.MybatisUtils;
import org.hk.studyMybatis.mapper.AdminMapper;

import java.sql.Connection;
import java.sql.SQLException;
import java.util.List;

public class AdminDaoImpl implements AdminDao,AdminForCatOwenerDao{
    Connection connection;
    public AdminDaoImpl() throws IllegalAccessException, SQLException, ClassNotFoundException {
        //connection = ReflectJDBC.init();
    }
    //查询所有，函数方法  返回值类型   方法名   和参数列表
    public List<Admin> getAllAdmin() throws IllegalAccessException, SQLException, InstantiationException {
        //return ReflectJDBC.getList(connection,Admin.class);
//        AdminMapper adminMapper = MybatisUtils.getMapper(AdminMapper.class);
//        List<Admin> admins = adminMapper.getAll();
//        return admins;
        //return MybatisUtils.getMapper(AdminMapper.class).getAll();
        return null;
    }
    public Integer add(Admin  admin){return 0;}
    public Integer update(Admin admin){return 0;}
}
